#pragma once

#include <string>
#include <vector>
#include <iostream>
#include <thread>

#include "Structs.h"
#include "LidarConfigurationOptions.h"

#ifdef _WIN32
#ifdef ISCLIBLIDAR_EXPORTS
#define ISCLIBLIDAR_API __declspec(dllexport)
#elif defined(DEMO_BUILD)
#define ISCLIBLIDAR_API  // 在demo模式下不使用导入/导出
#else
#define ISCLIBLIDAR_API __declspec(dllimport)
#endif
#else
#define ISCLIBLIDAR_API
#endif

/// @brief 激光雷达数据管理
class ISCLIBLIDAR_API ILidarDataManager
{
public:
    /// @brief 设置配置参数
    /// @param options
    /// @return
    virtual void UseOptions(std::vector<LidarConfigurationOptions *> options)=0;

    /// @brief 添加回调--数据接收
    /// @param callback
    virtual bool addPointCloudMsgCallback(PointCloudDataCallback callback) = 0;

    /// @brief 启动
    /// @return
    virtual bool start() = 0;

    /// @brief 停止
    /// @return
    virtual bool stop() = 0;

    /// @brief 释放
    /// @return
    virtual bool dispose() = 0;
};

/// @breif 激光雷达数据管理-入口类
class ISCLIBLIDAR_API LidarDataManager {
public:
    /// @brief 获取激光雷达数据管理-入口类
    /// @param lidarInfo
    /// @param config
    /// @return
    static ILidarDataManager *getInstance();
};